package com.prp.gwt.client.vo;

import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.ui.Image;

public class MailboxInfo implements IsSerializable{

	private User sender;
	private User receiver;
	private Integer state;
	private String title;
	private Integer mailId;
	private Integer id;
	
	public void copy(MailboxInfo mail){
		this.sender = mail.sender;
		this.receiver = mail.receiver;
		this.state = mail.state;
		this.title = mail.title;
		this.mailId = mail.mailId;
		this.id = mail.id;
	}
	public void setSender(User sender) {
		this.sender = sender;
	}

	public void setReceiver(User receiver) {
		this.receiver = receiver;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setMailId(Integer mailId) {
		this.mailId = mailId;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	public int getMailId(){
		return mailId;
	}
	
	public int getId(){
		return id;
	}
	
	public String getTitle(){
		return title;
	}
	
	public String getSenderName(){
		return sender.getUsername();
	}
	
	public Image getSenderPortrait(){
		return new Image(sender.getPortrait());
	}
	
	public String getReceiverName(){
		return receiver.getUsername();
	}
	
	public Image getReceiverPortrait(){
		return new Image(receiver.getPortrait());
	}
	
	public User getSender(){
		return sender;
	}
	
	public User getReceiver(){
		return receiver;
	}
	
	public int getState(){
		return state;
	}
}
